import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';

/**
 * 查询字段
 */
export const searchFormSchema: FormSchema[] = [
  {
    label: '创建时间',
    field: 'keyword',
    component: 'DatePicker',
    componentProps: {
      showTime: true,
      valueFormat: 'YYYY-MM-DD',
      placeholder: '请选择创建时间',
    },
    colProps: { span: 6 },
  },
  {
    label: '开始时间',
    field: 'keyword',
    component: 'DatePicker',
    componentProps: {
      showTime: true,
      valueFormat: 'YYYY-MM-DD',
      placeholder: '请选择开始时间',
    },
    colProps: { span: 6 },
  },
  {
    label: '结束时间',
    field: 'keyword',
    component: 'DatePicker',
    componentProps: {
      showTime: true,
      valueFormat: 'YYYY-MM-DD',
      placeholder: '请选择结束时间',
    },
    colProps: { span: 6 },
  },
  {
    label: '检测中心',
    field: 'keyword',
    component: 'JInput',
    colProps: { span: 6 },
  },
  {
    label: '作废表示',
    field: 'keyword',
    component: 'JInput',
    colProps: { span: 6 },
  },
];
/**
 * 表格数据
 */
export const columns: BasicColumn[] = [
  {
    title: '序号',
    dataIndex: '',
    key: 'rowIndex',
    width: 60,
    align: 'center',
    customRender: ({ index }) => {
      return parseInt(index) + 1;
    },
  },
  {
    title: '报告编码',
    dataIndex: 'phone', //字段不对
    width: 120,
  },
  {
    title: '样品编码',
    dataIndex: 'phone',
    width: 100,
  },
  {
    title: '原始编号',
    dataIndex: 'phone',
    width: 120,
  },
  {
    title: '内部编号',
    dataIndex: 'phone',
    width: 80,
  },
  {
    title: '样品名称',
    dataIndex: 'orgCode',
    width: 100,
  },
  {
    title: '样品规格',
    dataIndex: 'sex',
    width: 100,
  },
];
/**
 * 表单数据
 */
export const formSchema: FormSchema[] = [
  {
    label: '报告编码',
    field: 'name',
    component: 'Input',
  },
  {
    label: '样品编码',
    field: 'name1',
    component: 'Input',
  },
  {
    label: '原始编号',
    field: 'testStdNo',
    component: 'Input',
  },
  {
    label: '内部编号',
    field: 'testStdNo1',
    component: 'Input',
  },
  {
    label: '样品名称',
    field: 'testStdNo2',
    component: 'Input',
  },
  {
    label: '样品规格',
    field: 'orgName',
    component: 'Input',
  },
];
